package com.woniuxy.personal.core.service.impl;

import com.woniuxy.personal.core.model.PlCart;
import com.woniuxy.personal.core.mapper.PlCartMapper;
import com.woniuxy.personal.core.service.PlCartService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gmx
 * @since 2021-06-29
 */
@Service
public class PlCartServiceImpl extends ServiceImpl<PlCartMapper, PlCart> implements PlCartService {

    @Resource
    PlCartMapper plCartMapper;

    @Override
    public List<PlCart> selectAll(Integer userId) {
        return plCartMapper.selectAll(userId);

    }

    @Override
    public int deleteCart(List<Integer> ids) {
        return plCartMapper.deleteByGroup(ids);

    }

}
